package com.shujia.java.day6.string;

import java.util.Scanner;

public class demo {
    public static void main(String[] args) {
        String a = "竹纤维本色纸";
        int sum = a.length();
        System.out.println(sum);
        //用户登录 账号密码
        String username = "String";
        String password = "123456";

        System.out.println(username.toLowerCase());
        System.out.println(username.toUpperCase());
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入账号");
        String name=sc.next();
        System.out.println("请输入密码");
        String pwd=sc.next();

        if(username.equalsIgnoreCase(name)&& password.equalsIgnoreCase(pwd)){
            System.out.println("登录成功");
        }else {
            System.out.println("登录失败");
        }

    }
}
